/********************************************************************
	TABAL ENGINE - 2012/11/09
	author:		Marc Cuscullola
	
	purpose:	Defines an input device
*********************************************************************/
#pragma once

#ifndef __INPUT_DEVICE__INCLUDED_H__
#define __INPUT_DEVICE__INCLUDED_H__

#include "InputDefs.h"
#include <dinput.h>

class CInputDevice
{
public:
	CInputDevice();
	virtual ~CInputDevice();

	bool	Initialize	(LPDIRECTINPUT8 _directInput, HWND _hWnd, REFGUID _rguid, LPCDIDATAFORMAT _lpdf, bool _bExclusiveMode = false);
	void	Uninitialize();
	
	virtual bool Update () = 0;

protected:
	bool	GetData		(Input::INPUT_DEVICE_TYPE _type, void *_pData, DWORD *_pDwNum);

protected:
	LPDIRECTINPUTDEVICE8	m_DIDevice;
	LPDIRECTINPUT8			m_DirectInput;
	HWND					m_hWnd;

};

#endif //__INPUT_DEVICE__INCLUDED_H__